<template>
  <div class="main">
    <!-- 头部导航栏 -->
    <head-component
      :noBack="false"
      :title="title"/>

    <div class="top"></div>
    <div class="con f30 col_33" v-html="txt.p_content">

    </div>
  </div>
</template>

<script>
import headComponent from '@/components/layout/head'
export default {
  name: "gonglueD.vue",
  data() {
    return {
      txt:'',
      id:'',
      title: this.$route.query.title
    }
  },
  created(){
    var $this = this;
    $this.id = $this.$route.query.id;
    $this.getCon($this.id);
  },
  methods:{
    getCon(id){
      var $this = this;
      var t = this.$toast.loading({message:'正在加载数据',mask:true, duration:9999})
      var data = {u_id: localStorage.getItem('uid'),token:localStorage.getItem('token'),p_id:id};
      $this.$axios.post('index.php?m=index&c=product_s_content',data)
        .then((res) => {
          t.clear();
          if(res.data.code == 1){
            $this.txt = res.data.res;
          }else{
            $this.$toast({
              message: '请先登录',
              duration: 800,
              onClose:()=>{
                $this.$router.push('/login');
              }
            })
          }
        })
    },
  },
  components: {
    headComponent,
  },
}
</script>

<style scoped  lang="less">
  .layout-head{border-bottom: 0.02rem solid #f5f5f5;}
  .top{width: 92%;
    margin: 0.8rem auto 0rem;padding: 0 0 0.4rem;}
  .con{
    width: 92%;
    margin: 0.5rem auto;
    overflow: hidden;
    line-height: 0.6rem;
  }
</style>
